Skip to content

More helpful error for missing self#14386

Merged
hauntsaninja merged 3 commits intopython:masterfrom
hauntsaninja:self-error
Jan 3, 2023
Merged

More helpful error for missing self#14386
hauntsaninja merged 3 commits intopython:masterfrom
hauntsaninja:self-error

Conversation

@hauntsaninja
Copy link
Copy Markdown
Collaborator

Fixes #14385

Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice idea!

Comment thread mypy/semanal.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 3, 2023

Diff from mypy_primer, showing the effect of this PR on open source code:

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/orion/orchestration/global_policy.py:45: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/global_policy.py:45: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/global_policy.py:62: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/global_policy.py:62: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:41: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:41: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:58: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:58: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:76: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:76: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]
- src/prefect/orion/orchestration/core_policy.py:81: error: Method must have at least one argument  [misc]
+ src/prefect/orion/orchestration/core_policy.py:81: error: Method must have at least one argument. Did you forget the "self" argument?  [misc]

@hauntsaninja hauntsaninja merged commit 2413578 into python:master Jan 3, 2023
@hauntsaninja hauntsaninja deleted the self-error branch January 3, 2023 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Method must have at least one argument [misc]

3 participants